// import Counter from './Counter'
//
// export default Counter
import { injectReducer } from '../../reducers'

export default (store) => ({
    path: '/counter',
    getComponent(nextState, cb) {
        require.ensure([], (require) => {

            const Counter = require('./Counter').default
            const reducer = require('../../reducers/counter').default

            /*  Add the reducer to the store on key 'counter'  */
            injectReducer(store, { key: 'counter', reducer })

            /*  Return getComponent   */
            cb(null, Counter)

        }, 'counter')
    }
})